TARGET=zhen

OBJ := main.o

INCLUDE = -I./kernel/include/ -I./device/include/

CFLAGS = -Wall -g $(INCLUDE)

CC = gcc

D_OBJ := $(wildcard ./device/src/*.c)
D_OBJ := $(patsubst %.c,%.o,$(D_OBJ))



OBJ += $(D_OBJ)

k_OBJ := $(wildcard ./kernel/src/*.c)
k_OBJ := $(patsubst %.c,%.o,$(k_OBJ))


OBJ += $(k_OBJ)


$(TARGET): $(OBJ)
	$(CC) -o $@ $^

%.o: %.c
	$(CC) $(CFLAGS) -c $< -o $@ 

clean:
	rm -f $(TARGET) $(OBJ)